package com.springredis.service;

import com.springredis.dao.BookDao;
import java.util.*;
import com.springredis.pojo.Book;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import javax.xml.crypto.KeySelector;

@Service
public class BookService {
	@Resource
	BookDao bookDao;
	public String getValue(String key){
		return bookDao.getValue(key);
	}
	public void setValue(String key,String value){
		bookDao.setValue(key,value);
	}
	public List<Book>findBooks(String id){
		return bookDao.findBooks(id);
	}
	public void saveBooks(Object key,List<Book> books){
		bookDao.saveBooks(key,books);
	}
	public Book findBookById(int id){
		return bookDao.findBookById(id);
	}
	public void saveBook(Book book){
		bookDao.saveBook(book);
	}
	public void delete(int id){
		bookDao.deleteBook(id);
	}
}
